package com.hotmocha.jclient.codec;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;

public class ResponseCodecFactory implements ProtocolCodecFactory {

	private ProtocolDecoder decoder = null;
	private ProtocolEncoder encoder = null;
	
	public ResponseCodecFactory() {
		this.decoder = new ResponseDecoder();
		this.encoder = new ResponseEncoder();
	}
	
	@Override
	public ProtocolDecoder getDecoder(IoSession arg0) throws Exception {
		return this.decoder;
	}

	@Override
	public ProtocolEncoder getEncoder(IoSession arg0) throws Exception {
		return this.encoder;
	}

}
